package com.changeover.gwt.shared.datasource.impl;

import java.util.Date;
import java.util.List;

import com.changeover.gwt.shared.datasource.ICustomerDataSource;
import com.changeover.gwt.shared.model.customer.ComplexCustomer;
import com.changeover.gwt.shared.model.customer.ICustomer;
import com.changeover.gwt.shared.model.customer.LastAction;
import com.google.common.collect.ImmutableList;

public class ComplexCustomerDataSource implements ICustomerDataSource {

    private final List<LastAction> lastActions = ImmutableList.of(new LastAction(1, "correspondence started"),
                                                                  new LastAction(2, "not responding"));

    private final List<ICustomer> customers = ImmutableList.<ICustomer> of(new ComplexCustomer(9123, "Apple AF", "A",
                                                                                               new LastAction(1, "correspondence started"), null),
                                                                           new ComplexCustomer(9125, "Dagoberk Duck",
                                                                                               "A", new LastAction(2, "not responding"),
                                                                                               new Date(2012, 5, 23)),
                                                                           new ComplexCustomer(8932, "Microsoft", "A",
                                                                                               new LastAction(1, "correspondence started"), null),
                                                                           new ComplexCustomer(9999, "Trapper Joch MD",
                                                                                               "A", new LastAction(1, "correspondence started"), null));
    
    @Override
    public List<ICustomer> getCustomers() {
        return customers;
    }

    @Override
    public List<LastAction> getLastActions() {
        return lastActions;
    }
}
